#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
#include<string.h>
#include <ctype.h>

my_muncpy(void* arr1, const void* arr2, size_t sz)
{
	if (arr1 < arr2)
	{
		while (sz--)
		{
			*(char*)arr1 = *(char*)arr2;
			++(char*)arr1;
			++(char*)arr2;
		}
	}
	else
		while(sz--)
	{
		*((char*)arr1+sz) = *((char*)arr2+sz);
	}
	
}


int main() 
{
	int arr1[10] = { 0 };
	int arr2[10] = { 1,2,3,4,5,6,7,8,9,10 };
	
	my_muncpy(arr2+2, arr2, 20);
	int i = 0;
	for (i = 0;i<10; i++)
	{
		printf("%d ", arr2[i]);
		
	}
	


	return 0;
}
